<template>
<!-- switch 组件 -->
  <div id="app">
    <!-- 单个switch -->
    <el-switch v-model='switchValue' active-color='red' inactive-color=blue>
    </el-switch>
    <el-row>
      <el-switch 
      v-for="(item) in showData"
      :key='item.id'
      v-model="item.switchVal">
      </el-switch>
    </el-row>

        
  </div>
</template>

<script>

export default {
  name: 'App',
  components: {
    
  },
  data:function(){
    return{
      switchValue:true,
      showData:[
        {
          id:1,
          title:'刘某',
          switchVal:true
        },
        {
          id:2,
          title:'周某',
          switchVal:false
        },
        {
          id:3,
          title:'周某',
          switchVal:true
        }
      ]
    }
  },
  methods:{
   
  }
}
</script>

<style>
*{
  margin:0;
  padding: 0;
  box-sizing: border-box;
}
</style>
